package iqq.util;

import iqq.App;
import iqq.common.IQQConstants;

import com.alee.extended.background.NinePatchIconPainter;
import com.alee.utils.XmlUtils;

/**
 * @author ChenZhiHui
 * @create-time 2013-3-8
 */
public class NinePatchUtils {

	public static NinePatchIconPainter<?> getNinePatchIconPainter(String res) {
		if (res != null && !Strings.isEmpty(res)) {
			return XmlUtils.loadNinePatchIconPainter(App.class.getClass()
					.getResource(IQQConstants.RESOURCES_NAME + "/" + res));
		}
		return null;
	}
}
